package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.PackageEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 商品套餐信息表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-04-17 16:40:35
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class PackageQuery extends PackageEntity implements Query<PackageEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 套餐本身的spu_id查询条件 */
	@JsonUnwrapped(prefix = "packageSpuId")
	private Condition<String> packageSpuIdCondition;

    /** 套餐本身的sku_id查询条件 */
	@JsonUnwrapped(prefix = "packageSkuId")
	private Condition<String> packageSkuIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "spuId")
	private Condition<String> spuIdCondition;

    /** 套餐内的sku_id查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 套餐内的sku数量查询条件 */
	@JsonUnwrapped(prefix = "skuNum")
	private Condition<Integer> skuNumCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public PackageQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public PackageQuery(PackageEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public PackageQuery(PackageQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.packageSpuIdCondition != null) {
			this.packageSpuIdCondition = other.packageSpuIdCondition.copy();
		}
		if(other.packageSkuIdCondition != null) {
			this.packageSkuIdCondition = other.packageSkuIdCondition.copy();
		}
		if(other.spuIdCondition != null) {
			this.spuIdCondition = other.spuIdCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.skuNumCondition != null) {
			this.skuNumCondition = other.skuNumCondition.copy();
		}
	}

	@Override
	public QueryWrapper<PackageEntity> toQueryWrapper() {
		QueryWrapper<PackageEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (packageSpuIdCondition != null) {
			packageSpuIdCondition.toWrapper(wrapper, COL_PACKAGE_SPU_ID);
		}
		if (packageSkuIdCondition != null) {
			packageSkuIdCondition.toWrapper(wrapper, COL_PACKAGE_SKU_ID);
		}
		if (spuIdCondition != null) {
			spuIdCondition.toWrapper(wrapper, COL_SPU_ID);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (skuNumCondition != null) {
			skuNumCondition.toWrapper(wrapper, COL_SKU_NUM);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回套餐本身的spu_id查询条件
	 * 
	 * @return packageSpuIdCondition 套餐本身的spu_id查询条件
	 */
	public Condition<String> packageSpuId() {
		this.packageSpuIdCondition = new Condition<>();
		return this.packageSpuIdCondition;
	}
	
	/**
	 * 获取套餐本身的spu_id查询条件
	 * 
	 * @return packageSpuIdCondition 套餐本身的spu_id查询条件
	 */
	public Condition<String> getPackageSpuIdCondition() {
		return packageSpuIdCondition;
	}

	/**
	 * 设置套餐本身的spu_id查询条件
	 * 
	 * @param packageSpuIdCondition 套餐本身的spu_id查询条件
	 */
	public void setPackageSpuIdCondition(Condition<String> packageSpuIdCondition) {
		this.packageSpuIdCondition = packageSpuIdCondition;
	}

	/**
	 * 构造并返回套餐本身的sku_id查询条件
	 * 
	 * @return packageSkuIdCondition 套餐本身的sku_id查询条件
	 */
	public Condition<String> packageSkuId() {
		this.packageSkuIdCondition = new Condition<>();
		return this.packageSkuIdCondition;
	}
	
	/**
	 * 获取套餐本身的sku_id查询条件
	 * 
	 * @return packageSkuIdCondition 套餐本身的sku_id查询条件
	 */
	public Condition<String> getPackageSkuIdCondition() {
		return packageSkuIdCondition;
	}

	/**
	 * 设置套餐本身的sku_id查询条件
	 * 
	 * @param packageSkuIdCondition 套餐本身的sku_id查询条件
	 */
	public void setPackageSkuIdCondition(Condition<String> packageSkuIdCondition) {
		this.packageSkuIdCondition = packageSkuIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return spuIdCondition 查询条件
	 */
	public Condition<String> spuId() {
		this.spuIdCondition = new Condition<>();
		return this.spuIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return spuIdCondition 查询条件
	 */
	public Condition<String> getSpuIdCondition() {
		return spuIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param spuIdCondition 查询条件
	 */
	public void setSpuIdCondition(Condition<String> spuIdCondition) {
		this.spuIdCondition = spuIdCondition;
	}

	/**
	 * 构造并返回套餐内的sku_id查询条件
	 * 
	 * @return skuIdCondition 套餐内的sku_id查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取套餐内的sku_id查询条件
	 * 
	 * @return skuIdCondition 套餐内的sku_id查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置套餐内的sku_id查询条件
	 * 
	 * @param skuIdCondition 套餐内的sku_id查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回套餐内的sku数量查询条件
	 * 
	 * @return skuNumCondition 套餐内的sku数量查询条件
	 */
	public Condition<Integer> skuNum() {
		this.skuNumCondition = new Condition<>();
		return this.skuNumCondition;
	}
	
	/**
	 * 获取套餐内的sku数量查询条件
	 * 
	 * @return skuNumCondition 套餐内的sku数量查询条件
	 */
	public Condition<Integer> getSkuNumCondition() {
		return skuNumCondition;
	}

	/**
	 * 设置套餐内的sku数量查询条件
	 * 
	 * @param skuNumCondition 套餐内的sku数量查询条件
	 */
	public void setSkuNumCondition(Condition<Integer> skuNumCondition) {
		this.skuNumCondition = skuNumCondition;
	}

}
